﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL.Users.Impl;
using BLL.Users;
using Model;
using GenericLibrariesToolKit;
using Utils;
public partial class Page_Expert_ExpertOfList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

            enterpriseDataBind();
    }
    protected void LBEnterpriseName_Click(object sender, EventArgs e)
    {
        LinkButton bt = (LinkButton)sender;
        string enterpriseId = bt.CommandArgument.ToString();
        Response.Redirect("EnterpriseDetails.aspx?enterpriseId=" + enterpriseId);
    }

    private void enterpriseDataBind()
    {
        EnterpriseBO enterpriseBO = new EnterpriseBOImpl();
        QueryResult<Enterprise> enterpriseQuery = enterpriseBO.GetScrollData();
        List<Enterprise> enterpriseList = enterpriseQuery.ResultList;
        GVEnterprise.DataSource = enterpriseList;
        GVEnterprise.DataBind();
    }
    //返回主页面
    protected void btnEnterpricesBack_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("<script language=javascript>history.go(-2);</script>");
    }
    protected void GVEnterprise_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GVEnterprise.PageIndex = e.NewPageIndex;
        this.GVEnterprise.DataBind();

    }
}